/**
 * Created by xuan on 15/11/25.
 */
define(function (require) {
    require('angular-mocks');
    require('static_public/js/angular_directive/number.js');
    describe('number', function () {
        var scope, $compile, element;
        beforeEach(module('angular.directive.number'));
        beforeEach(inject(function ($rootScope, _$compile_) {
            scope = $rootScope;
            $compile = _$compile_;
            element = angular.element('<input type="number" ng-model="num"/>');
        }));
        it('number元素不能输入a-z', function () {
            $compile(element)(scope);
            element[0].value = 'a1';
            scope.$digest();
            expect(element.val()).toEqual('');
        });
    });
});